package com.jzx.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author JunedQQ
 * @create 2019/6/30
 * @since 1.0.0
 */
public class InfoAddressUtils {

    public static String list2String(List<String> list){
        String address = "";
        for (int i=0 ;i<list.size();i++){
            address = address + list.get(i);
            if (i !=0 && i!=list.size()-1){
                address = address + ",";
            }
        }
        return address;
    }

    public static List<String> string2List(String address){
        List<String> list = new ArrayList<>();
        String addresss[] = address.split(",");

        for (int i=0;i<addresss.length;i++){
            list.add(addresss[i]);
        }
        return list;
    }
}